package Task3;
/**
 * 用户消费信息类
 * 特征：统计通话时长、统计上网流量、每月消费金额
 */
public class ConsumerInfo {

    private int countTalkTime;  // 统计通话时长
    private int countNetFlow;   // 统计上网流量
    private int expensePerMonth;// 每月消费金额

    public ConsumerInfo() {
    }

    public ConsumerInfo(int countTalkTime, int countNetFlow, int expensePerMonth) {
        this.countTalkTime = countTalkTime;
        this.countNetFlow = countNetFlow;
        this.expensePerMonth = expensePerMonth;
    }

    public int getCountTalkTime() {
        return countTalkTime;
    }

    public void setCountTalkTime(int countTalkTime) {
        if(countTalkTime>=0) {
            this.countTalkTime = countTalkTime;
        } else {
            System.out.println("统计通话时长不合理哦！");
        }
    }

    public int getCountNetFlow() {
        return countNetFlow;
    }

    public void setCountNetFlow(int countNetFlow) {
        if(countNetFlow>=0) {
            this.countNetFlow = countNetFlow;
        } else {
            System.out.println("统计上网流量不合理哦！");
        }
    }

    public int getExpensePerMonth() {
        return expensePerMonth;
    }

    public void setExpensePerMonth(int expensePerMonth) {
        if(expensePerMonth>=0) {
            this.expensePerMonth = expensePerMonth;
        } else {
            System.out.println("每月消费金额不合理哦！");
        }
    }
}
